package com.yun.dao.db;


import com.yun.pojo.db.Doctor;
import com.yun.pojo.db.Sickroom;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.Collection;
import java.util.HashMap;
import java.util.Map;

/*模拟员工数据*/
@Repository
@Mapper
public class DbDoctor {
    private static Map<Integer, Doctor> doctors=null;

    static {
        doctors = new HashMap<Integer, Doctor>();
        doctors.put(101,new Doctor(101,"华佗",38,1,new Sickroom(1,"诊疗室"),15,"工作勤奋"));
        doctors.put(102,new Doctor(102,"扁鹊",28,1,new Sickroom(1,"诊疗室"),10,"工作努力"));
        doctors.put(103,new Doctor(103,"李清照",18,0,new Sickroom(1,"诊疗室"),5,"工作认真"));
        doctors.put(104,new Doctor(104,"貂蝉",19,0,new Sickroom(1,"药房"),2,"兢兢业业"));
        doctors.put(105,new Doctor(105,"西施",50,0,new Sickroom(1,"药房"),25,"认认真真"));
        doctors.put(106,new Doctor(106,"张仲景",45,1,new Sickroom(1,"手术室"),20,"扎实肯干"));
        doctors.put(107,new Doctor(107,"嬴政",18,1,new Sickroom(1,"手术室"),12,"技术高超"));
    }

    public Collection<Doctor> getDoctor(){
        return doctors.values();
    }
}
